package com.xbh.management.handler;

import com.alibaba.fastjson.JSONObject;
import com.rabbitmq.client.Channel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.io.IOException;
import java.util.Map;

/**
 * @program: management-center
 * @description:
 * @author: 许宝华
 * @create: 2022-01-10 10:08
 */


//@Component
@Slf4j

public class RabbitMQTest {

    @RabbitListener(queues = "mc.send.message")
    @RabbitHandler
    public void process(JSONObject testMessage)  {


        log.info("DirectReceiver消费者收到消息  : " + testMessage.toString());


    }

}
